/*
 * Copyright (C) 2017 Pingan, Inc. All Rights Reserved.
 */

package com.pingan.haofang.searchcloud.web.index.vo;

import com.pingan.haofang.searchcloud.api.constants.EngineType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * cluster vo
 *
 * @author zhangbi617
 * @date 2017-07-19
 */
@ApiModel(description = "集群信息")
public class EngineVo {
    public EngineVo() {
    }

    public EngineVo(EngineType engineType, List<ClusterVo> clusters) {
        this.engineType = engineType.getValue();
        this.engineTypeName = engineType.name();
        this.clusters = clusters;
    }

    @ApiModelProperty(value = "引擎类型")
    private int engineType;

    @ApiModelProperty(value = "引擎类型名")
    private String engineTypeName;

    @ApiModelProperty(value = "集群列表")
    private List<ClusterVo> clusters;

    public String getEngineTypeName() {
        return engineTypeName;
    }

    public void setEngineTypeName(String engineTypeName) {
        this.engineTypeName = engineTypeName;
    }

    public List<ClusterVo> getClusters() {
        return clusters;
    }

    public void setClusters(List<ClusterVo> clusters) {
        this.clusters = clusters;
    }

    public int getEngineType() {
        return engineType;
    }

    public void setEngineType(int engineType) {
        this.engineType = engineType;
    }

    @Override
    public String toString() {
        return "EngineVo{" +
                "engineTypeName='" + engineTypeName + '\'' +
                ", clusters=" + clusters +
                '}';
    }
}
